Relax BUG_ON() state ment in increase_reservation() in balloon.c.
authorkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 28 Apr 2006 07:30:52 +0000 (08:30 +0100)
committerkaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk>
Fri, 28 Apr 2006 07:30:52 +0000 (08:30 +0100)
When xen_feature(XENFEAT_auto_translated_physmap) = 1,
phys_to_machine_mapping_valid(pfn) always returns true.
Relaxed BUG_ON() for xen_feature(XENFEAT_auto_translated_physmap) = 1 case.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c

index 46f587f6c085c0c2161b4ab5e10160d7f69124ae..925de702f66cf87f4402c20b30d19191138120e2 100644 (file)
@@ -216,7 +216,8 @@ static int increase_reservation(unsigned long nr_pages)
                BUG_ON(page == NULL);
 
                pfn = page_to_pfn(page);
-               BUG_ON(phys_to_machine_mapping_valid(pfn));
+               BUG_ON(!xen_feature(XENFEAT_auto_translated_physmap) &&
+                      phys_to_machine_mapping_valid(pfn));
 
                /* Update P->M and M->P tables. */
                set_phys_to_machine(pfn, frame_list[i]);